Repository navigation
perf(ci): stop runners doing work a PR cannot change - #4665
Conversation
…ange The producer ran on every pull request and resolved a fingerprint that @expo/fingerprint hashes with examples/test-app/ as the project root, so a diff outside that tree cannot change the artifact name it publishes or the trust rules a consumer applies. Over the last 120 merged PRs it started 117 runs and 12 had a path that can change what that job reads. Each run cost 0.57 minutes: one checkout, one install, and two artifact lookups that always found main's binary. Give the pull_request trigger the paths that job's own steps read, and add the workflow-level concurrency it never had: a consumer trusts an artifact only from its own exact head or from a main push, so a producer that finishes for a superseded head is never downloaded. Main pushes keep a per-sha group so a build that feeds every later PR's cache always finishes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The command-reference gate started its own runner, checked out the tree, and installed the same dependency graph the docs lane had just installed, to run one Vitest file over the Markdown the lane's other gates already read. Measured on recent runs, that job spent 23.6 seconds on checkout and install to spend 3.2 seconds on the gate. Declare it in the docs lane's existing job and drop the second one. The lane now carries all five docs gates from one install, which is also what the manifest's path reachability reads, so the witness for #1420 stops the whole lane instead of narrowing one filter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The layering, depgraph, and affected-selector gates each parse the whole production source tree, and the job waited for all three in sequence: 62.5 + 18.8 + 24.8 seconds averaged over recent runs, against a 2.7-minute job. They read the same tree and write nothing one another reads, so the order between them carries no meaning. Run them as one parallel group, the shape the lint, typecheck, and format gates already use in this workflow, so the job pays the slowest reader instead of the sum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Size Report
Startup median (7 runs, lower is better):
|
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
|
This PR is ready at 967f029, and I found no blocking issues. All 21 checks pass, and the changed workflows ran themselves: the merged Docs job, Test App Build Cache (the fingerprint step passed) and the Repo Guards parallel group. There are no conflicts, and nothing else needs to happen before merge. Not blocking, and you can take or leave these: the comment at test-app-build-cache.yml#L36 says the filter lists what the job's own steps read, but the test-app gates run through The 117-of-120 run counts and runner-minute figures come from the PR body. The "reuse main's artifact" route for a PR that touches none of the listed paths has not run yet, so it rests on the workflow code. |
Summary
Baseline across the 12 most recent PRs: mean 36.5 runner-minutes per PR (Android 5.62, Apple
4.45 + 4.23, Integration 2.86, Repo Guards 2.73). Three workflows pay for work a PR cannot change.
test-app-build-cache.ymlran on every PR, resolving a fingerprint@expo/fingerprinthasheswith
examples/test-app/as project root. Across 120 merged PRs it started 117 runs; 12had a path that can change what it reads. Each cost 0.62 min, always finding main's binary.
Added those paths and the concurrency group it never had.
docs.ymlstarted a second runner to install the graph the docs lane had just installed: thatjob cost 0.49 min for a 3.2 s gate. One job now declares all five docs gates and costs
0.68 min, against 1.20 for the two.
ci.ymlran layering (62.5 s), affected-selector (24.8 s) and depgraph (18.8 s) in sequence,each parsing the same tree. In one
parallelgroup that job costs 2.25 min, against 2.56.At this head: CI and
Docs.
Rejected on measurement: the pnpm store cache hits its primary key in every job; checkout with full
history is 2–3.5 s, so
filter: blob:nonebuys nothing; selection-guarded device lanes ran 11 of12 PRs, so job-level skipping gates nothing.
Validation
check:gate-manifestgreen (60 checks, 24 lanes);node --test scripts/gate/*.test.ts53/53;unit-core CI-config tests 6/6; oxfmt and oxlint clean. The #1420 witness now stops the whole docs
lane, which owns every docs gate. Risk: a missed path costs one inline build, not a wrong binary.
🤖 Generated with Claude Code